﻿#pragma once
#include "yzrutil.h"
#include "CharReader.h"
namespace yzrilyzr_ast{
	enum TokenType{
		StringType,
		Number,
		Symbol,
		ID,
		Char,
		LineComment,
		BlockComment
	};
	EBCLASS(Token){
	public:
	u_index line=0,col=0;
	u_index start=0,end=0;
	std::string token;
	TokenType type;
	Token(CharReader& charReader,const std::string &token,TokenType type){
		this->line=charReader.line;
		this->col=charReader.col;
		this->token=token;
		this->type=type;
	}
	yzrilyzr_lang::String toString()const override{
		return token;
	}
	};
}